from django.conf.urls import url, include
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from rest_framework_jwt.views import obtain_jwt_token

from .views import AreasViewSet
from . import views
router = DefaultRouter()
router.register(r'infos',AreasViewSet,base_name='area')

urlpatterns = [
    url(r'^',include(router.urls))
]

#添加省市区信息查询路由
urlpatterns += router.urls

from .views import AddressViewSet
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'addresses',AddressViewSet,base_name='address')
urlpatterns += router.urls



